package person.bing.fbcloud.service;

import com.baomidou.mybatisplus.extension.service.IService;
import person.bing.fbcloud.api.entity.Post;
import person.bing.fbcloud.api.vo.HomePagePostVo;

import java.util.List;

/**
 * <p>
 * 帖子
 * </p>
 *
 * @author mengfb
 * @since 2019-06-24
 */
public interface PostService extends IService<Post> {
    /**
     * 发帖
     * @param userCode
     * @param title
     * @param text
     */
    void addPost(String userCode,String categoryKey,String title,String text);

    /**
     * 根据categoryKey获取帖子列表
     * @param categoryKey
     * @return
     */
    List<HomePagePostVo> getPost(String categoryKey);

    /**
     * 根据帖子id获取详情
     * @param postId
     * @return
     */
    Post getPostDetails(String postId);

    void test()throws Exception;
}
